{include file="index@public/header" /}

<div class="layui-container detail-container" style=";padding: 10px;"> 

	<div class="layui-card  card-box">
        
		
        <div class='firstbreadcrumb' style="padding: 10px;">
            
            {foreach $crumbs as $k=>$v }
            <a href="/{$v['crumbs_url']}" style="font: 14px arial,helvetica,sans-serif;color:#36648A;padding-right: 8px;display: inline-block;height: 48px;line-height: 48px">{$v['alias_name']}</a> <span style="padding-right:8px;padding-bottom: 8px;display: inline-block;"> / </span>
            {/foreach}
            <span style="font: 14px arial,helvetica,sans-serif;color: #666;"><cite>{$zhu['Part Number']}</cite></span>
            
        </div>
        
        <h1 style="width:100%;padding:0px 10px">{$zhu['Part Number']}</h1>
        

		<div style="padding:0px 10px">
            <div style="text-align:center;"><img src="{$img}?format=webp" style="cursor:pointer;width: 80px;" alt="{$zhu['Part Number']} {$classdesc['alias_name']}" /></div>
		</div>
        <style type="text/css">
            .layui-card-body tr{border-bottom: 1px solid #ccc}
        </style>
		<div class="layui-card-body">
			<div class="layui-row">
				<div class="layui-col-md4">
					
					<div class="layui-col-md9 padding-content">
						<table style='width: 100% !important;padding: 10px;'>
                            <tbody>
                            <?php  if(isset($zhu['URL_Product'])&&$zhu['URL_Product']){unset($zhu['URL_Product']);}?>
                            {foreach $zhu as $key=>$vo } 

                               <?php $lily_display_detail=Db::table('lily_products_detail')->where([['key','=',$key],['pid','=',$products['id']]])->find(); ?>
                               <?php if(empty($lily_display_detail)){?>
                                <tr>
                                    <td>{:lang(str_replace('_',' ',trim($key)))}</td>
                                    <td style="text-align:left">{:lang(trim($vo))}</td>
                                </tr>
                                <?php }else{ ?>

                                    <?php if($lily_display_detail['is_show_key']=='0'){ ?>
                                    <tr>
                                        <td></td>
                                        <td style="text-align:left">{:lang(trim($vo))}</td>
                                    </tr>
                                    <?php } else if(!empty($lily_display_detail['sup'])){ ?>
                                    <tr>
                                        <td>{:lang($key)} <sup style='color:#36648a'>{$lily_display_detail['sup']}</sup></td>
                                        <td style="text-align:left">{:lang(trim($vo))}</td>
                                    </tr>
                                    <?php } else if(!empty($lily_display_detail['url'])){ ?>
                                    <tr>
                                        <td>{:lang(trim($key))}</td>
                                        <td style="text-align:left"><a href="{$lily_display_detail['url']}" class='type4'>{:lang(trim($vo))}</a></td>
                                    </tr>
                                    <?php } else if($lily_display_detail['is_pi_pei']==1){ ?>
                                    <tr>
                                        <td>{:lang(trim($key))}</td>
                                        <td style="text-align:left">
                                    <?php   
                                        $explode_data=explode(',',$vo); foreach ($explode_data as $bk => $bv){
                                        $f=Db::table('lily_products')->field('url_product')->where('part_number', '=', $bv)->find();
                                        if(!empty($f)){ 
                                    ?>
                                            <a href="/products/{$f['url_product']}/" class='type4'>{:lang(trim($bv))}</a>
                                            <?php if($bk!=count($explode_data)-1){ echo ',';}?>
                                        <?php }else{ ?>
                                            {:lang($vo)}
                                            <?php if($bk!=count($explode_data)-1){ echo ',';}?>
                                        <?php } ?>
                                    <?php } ?>
                                        </td>
                                    </tr>
                                    <?php } else if($lily_display_detail['is_fen_ge']=='1'){ ?>
                                    <tr style="width: 500px;border-bottom:none;">
                                        <td style="height:30px;"></td><td></td>
                                    </tr>
                                    <tr style="width: 500px;border-bottom: 3px solid #ccc;">
                                        <td colspan="2" style="height:30px;font-size: 14px;font-weight: bold;">{:lang('Mounting Dimensions & Additional Information')}</td>
                                    </tr>
                                    <tr>
                                        <td>{:lang(str_replace('_',' ',trim($key)))}</td>
                                        <td style="text-align:left">{:lang(trim($vo))}</td>
                                    </tr>
                                    <?php }else{ ?>
                                    <tr>
                                        <td>{:lang(str_replace('_',' ',trim($key)))}</td>
                                        <td style="text-align:left">{:lang(trim($vo))}</td>
                                    </tr>
                                    <?php } ?>
                                <?php } ?>
                                
                            {/foreach}
                            </tbody>
                        </table>
                        <?php if(!empty($add_content)){?>
                            {foreach $add_content as $key=>$vo } 
                            <div style="width: 100%;font-style: italic;line-height:14px;padding:10px 0px">{:htmlspecialchars_decode($vo)}</div>
                            {/foreach}
                        <?php } ?>

					</div>
				</div>
				
				
			</div>


            <?php if(!empty($content)){?>
            <div style="margin-top:5px;color:#333" class='padding-content gengduoli'>
                {:htmlspecialchars_decode($content)}
            </div>
            <?php } ?>

		
            <?php if(!empty($recommend_result)){?>
            <div class="content-bottom-img-box" style="padding:10px 0px;background-color: #f6f6f6;">
                
                <div class="content-bottom-font" style="padding:5px;">{:lang('Recommended Products')}</div>
                   
                        {foreach $recommend_result as $key=>$vo } 
                        <a style="display:block;padding-left: 5px;margin:0px 5px 10px 5px;background-color:#fff;border-radius:5px" href='/products/{$vo["url_product"]}/'>
                            
                                <?php if(!empty($vo['img'])){?>
                                <div style="float:left"><img style="width: 35px;height: 35px;" src="{:Config::get('app.images_host')}{$vo['img']}?format=webp" alt=""></div>
                                <?php }else{ ?>
                                <div style="float:left"><img src=""></div>
                                <?php } ?>
                                <div style="float:left;height: 35px;line-height: 35px;padding-left: 5px">{$vo['part_number']}</div>
                                <div style="clear:both"></div>
                           
                        </a>
                        {/foreach}
                        
                   
            </div>
           <?php } ?>
		</div>
	</div>
</div>

{include file="index@public/footer" /}
<script type="text/javascript">
    function download_cad(){
       var index = layer.load(1, { shade: [0.1,'#fff'] });
       $('#download_cad').disabled=true;//禁用
       var format=$.trim($("select[name='selcad'] option:selected").val());
       location.href=format;
       layer.closeAll('loading');
       $('#download_cad').disabled=false;
      }
    $(document).ready(function(){
      $("#detailmoreid").click(function(){
        $("#detailmore").show();
        $("#detailmoreid").hide();
      });
      $("#detailcloseid").click(function(){
        $("#detailmore").hide();
        $("#detailmoreid").show();
      });
    });
   
    var area = [];
        if (window.screen.width > 1680 && window.screen.width <= 1920) {
            area = ['25%', '50%']
        } else if (window.screen.width > 1600 && window.screen.width <= 1680) {
            area = ['25%', '50%']
        } else if (window.screen.width > 1366 && window.screen.width <= 1600) {
            area = ['25%', '50%']
        } else if (window.screen.width <= 1366) {
            area = ['25%', '50%']
        }

        $(document).on('click','#detai_left_main',function(){
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                shadeClose: true, //点击阴影关闭
                area: area , //宽高
                //area: [$(this).width+100 + 'px', $(this).height+100 + 'px'], //宽高
                content: "<img style='width:100%;height:100%;' src=" + $(this).attr('src') + " alt='detai' />"
            });
        });
    
</script>
